import java.text.DecimalFormat;
import java.text.NumberFormat;

class test2 {
    public static double Kr = 10.0;
    public static double Km = 10.0;
    public static double Kp = 10.0;
    public static double gm = 1.0;
    public static double gp = 1.0;

    public static double G = 1;
    public static double M = 0;
    public static double P = 0;

    public static NumberFormat formatter;

    public static void step(double h) {
	double dG = 0;
	double dM = Km*G - gm*M;
	double dP = Kp*M - gp*P;

	G += h*dG;
	M += h*dM;
	P += h*dP;
    }

    public static void print(double time) {
	System.out.println("" + formatter.format(time) + " " + G + " " + M + " " + P);
    }

    public static void main(String args[]) throws Exception {

	formatter = new DecimalFormat("#0.00");

	double stepsize = Double.parseDouble(args[0]);
	double time = 0.0;
	for(int i=0; i<10; i++) {
	    print(time);
	    step(stepsize);
	    time += stepsize;
	}
    }
}
